//const isRelease = process.env.NODE_ENV === 'production';
let  isRelease = false;
function  checkEnv(){
    console.log('process.env.NODE_ENV:',process.env.NODE_ENV);
    if(process.env.NODE_ENV === 'production'){
        isRelease = true;
    }
    else{
        isRelease
    }

}
checkEnv();
/**Web 服务端口 */
const serverPort = isRelease ? 5001 : 5001;

const dev_dbConfig = {
    host: '39.104.26.70',
    user: 'root',
    port: '3306',
    password: 'whw@2023',
    database: 'wc',
    waitForConnections: true,
    connectionLimit: 10,
    queueLimit: 0,
  }
const pro_dbConfig = {
    host: 'mr-crfbqzx5yu1wpectzc.rwlb.huhehaote.rds.aliyuncs.com',
    user: 'sharebike',
    password: 'Gzhk@2024',
    database: 'sharebike',
    waitForConnections: true,
    connectionLimit: 50,
    queueLimit: 0,
}

/**数据库配置 */
const dbConfig = isRelease ? pro_dbConfig : dev_dbConfig;
/**redis配置 */
const redisConfig = isRelease ? 'redis://:ankuai@118.31.14.83:6379' : 'redis://:ankuai@118.31.14.83:6379';



export {
    isRelease, 
    serverPort, 
    dbConfig, 
    redisConfig
}